using System;
using System.Collections;
using lucere.io.concurrency;

namespace lucere.test.io.concurrency.mock
{
	public class LockFactoryMock:LockFactory
	{
		public bool lockPrefixSet;
		public IDictionary locksCreated = Hashtable.Synchronized(new Hashtable());
		public int makeLockCount = 0;
		public override string LockPrefix
		{
			get
			{
				return base.LockPrefix;
			}
			set
			{
				base.LockPrefix = value;
				lockPrefixSet = true;
			}
		}
		public override ILock MakeLock(string lockName)
		{
			ILock @lock = new LockMock();
            locksCreated.Add(lockName,@lock);
            makeLockCount++;
            return @lock;
		}

		public override void ClearLock(string lockName)
		{
		}
	}
}